Repository navigation
Learning examples: clean title, summary, reason and recent uses - #334
Merged
Merged
Conversation
…sed them Examples were kept as raw "title: body" text cut mid-word, so the Learning page showed HTML comments, callout markers, section labels and "Source ticket" lines. Each example now keeps a one-line title, a short cleaned markdown summary, the reason it is an example (from its outcome: CI, merge, close, acted on, dismissed, left open), the run that made it, and its last five uses. Examples kept before this are read the same way on the fly.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Learning page's "Examples in use" listed each example's raw stored text: PR bodies and review comments with HTML comments (
<!-- coderhelm:unverified -->), callout markers (> [!WARNING]),##and**Summary**labels, "Source ticket" lines, cut mid-word. Examples now carry what a compact list and a detail panel need, and older ones are read the same way without a migration. The dashboard side is in CoderHelm/coderhelm (same branch name).Changes
common::rewards::example_text(new):clean(markdown without HTML comments and tags, the unverified block, callout markers,Source ticket:/Closes #Nlines),plain(no marks at all),title(PR title or comment heading, else the first sentence, cut at a word),summary(cleaned markdown, at most 600 characters, cut at a word, open code fence closed),legacy_split(oldtitle: bodytext, keeping a commit type likefix(api):in the title and dropping a word cut when stored).Exemplargainstitle,summary,reason,run_id,last_used_at,used_by(latest 5 uses: reviewer + PR, or coding run).with_textbuilds title, summary and the prompt/embeddingtextfrom the GitHub title and body at store time;display()backfills title, summary and reason for examples stored before.with_textwith their reason; the fix keeps its run id.review_learningtakes the PR number andcoder_learningthe run id, socount_exemplar_userecords when and by what each example was used.title: plain summary), so agents no longer read HTML comments in examples.GET /api/learningexemplars: addstitle,summary,reason,events,run_id,last_used_at,used_by;textis now one clean line for older dashboards. Sorted by uses, then reward size; up to 200 (was 60, now that rows are small).Verification
cargo fmt --check --all,cargo clippy --workspace -- -D warnings,cargo test --workspace(2446 passed).used_by, the summary JSON (clean fields, most used first, legacy backfill).